package com.meida.module.bus.client.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import lombok.NoArgsConstructor;

/**
 * 订单解答审核状态
 *
 * @author gp
 * @date 2021/8/9
 */
@NoArgsConstructor
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
@ApiModel("订单解答审核状态")
public enum AnswerStateEnum {
    /**
     * 订单解答审核状态
     */
    waitAnswer(-1, "待解答", "待解答"),
    waitCheck(0, "待解答", "待审核"),
    checkIng(1, "审核中", "审核中"),
    checkPass(2, "审核通过", "审核通过"),
    checkFail(3, "审核失败", "审核失败");

    @EnumValue
    private Integer value;
    private String label;
    private String label2;

    AnswerStateEnum(Integer value, String label, String label2) {
        this.value = value;
        this.label = label;
        this.label2 = label2;
    }


    public void setValue(Integer value) {
        this.value = value;
    }

    public Integer getValue() {
        return value;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public String getLabel2() {
        return label2;
    }

    public void setLabel2(String label2) {
        this.label2 = label2;
    }

    public static AnswerStateEnum getByValue(Integer value) {
        for (AnswerStateEnum answerStateEnum : values()) {
            if (answerStateEnum.getValue() == value) {
                return answerStateEnum;
            }
        }
        return null;
    }
}
